from celery import Celery
# 创建celery应用
import os
if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'meiduo_mall.settings.dev'

celery_app=Celery('meiduo')
celery_app.config_from_object('celery_tasks.config')
# 导入任务,自动找task
celery_app.autodiscover_tasks(['celery_tasks.sms'])